<template>
	<view>
		<u-sticky offset-top="0">
			<navBarView title="电签委托合同" :statusBarHeight="statusBarHeight"></navBarView>
		</u-sticky>
		<view class="tabs flex-row-center">
			<view class="tabsItem flex-row-center">
				<view class="tabsItemText">
					全部
				</view>
				<image class="tabsItemIcon" src="/static/login_down.png"></image>
			</view>
			<view class="tabsItem flex-row-center">
				<view class="tabsItemText">
					待审批
				</view>
				<image class="tabsItemIcon" src="/static/login_down.png"></image>
			</view>
		</view>
		<view class="listView">
			<view @click="listViewItemClick(index)" class="listViewItem" v-for="index in 10" :key="index">
				<view class="listViewItem1 flex-row-space-between">
					<view class="listViewItem1a">
						2024.09.08 18:00
					</view>
					<view :style="index%2==0?'color: #EB2B3B;background: rgba(235,43,59,0.1);':'color: #55CD8C;background: rgba(85,205,140,0.1);'" class="listViewItem1b">
						{{index%2==0?'待审批':'已审批'}}
					</view>
				</view>
				<view class="listViewItem2">
					<text class="lab">案件类型：</text>刑事辩护
				</view>
				<view class="listViewItem2">
					<text class="lab">当事人：</text>张三
				</view>
				<view class="listViewItem2 flex-row-space-between">
					<view class="listViewItem4a">
						<text class="lab">律师费金额：</text>￥28999
					</view>
					<view class="listViewItem4b flex-row-flex-end">
						<view class="listViewItem4b1">
							删除
						</view>
						<view :style="index%2==0?'border: 2rpx solid #EB2B3B;color: #EB2B3B;':'border: 2rpx solid #55CD8C;color: #55CD8C;'" class="listViewItem4b2">
							{{index%2==0?'编辑':'查看'}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>

	export default {
		
		onShow() {
			let sysInfo = uni.getSystemInfoSync()
			this.statusBarHeight = sysInfo.statusBarHeight; // 状态栏高度
			this.criminalTypeViewTopHeight = 88+15; // case tyep 距离顶部高度
		},
		data() {
			return {
				statusBarHeight: '',// 状态栏高度 
				
			}
		},
		methods: {
			listViewItemClick(index){
				if (index%2==0) {//待审批  或  已审批
					uni.navigateTo({
						url:'/pageB/dianZiGuiDangDetail/dianZiGuiDangDetail'
					})
				} else{// 已保存 可以编辑，跳转对应的编辑页面
					switch (item.name){
						case "民事":
						{
							uni.navigateTo({
								url:'/pageA/minShiRegistration/minShiRegistration'
							})
						}
							break;
						case "行政":
						{
							uni.navigateTo({
								url:'/pageA/xingZhengRegistration/xingZhengRegistration'
							})
						}
							break;
						case "刑事":
						{
							uni.navigateTo({
								url:'/pageA/criminalRegistration/criminalRegistration'
							})
						}
							break;
						case "仲裁":
						{
							uni.navigateTo({
								url:'/pageA/zhongCaiRegistration/zhongCaiRegistration'
							})
						}
							break;
						case "非诉":
						{
							uni.navigateTo({
								url:'/pageA/feiSuRegistration/feiSuRegistration'
							})
						}
							break;
						default:
							break;
					}
				}
				
			}
		}
	}
</script>

<style>
	.listViewItem4b2{
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		line-height: 52rpx;
		text-align: center;
		margin-right: 24rpx;
	}
	.listViewItem4b1{
		width: 134rpx;
		height: 52rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		border: 2rpx solid #999999;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
		line-height: 52rpx;
		text-align: center;
		margin-right: 24rpx;
	}
	.listViewItem2{
		padding-top: 10rpx;
		padding-bottom: 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #333;
	}
	.lab{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #666666;
	}
	.listViewItem1b{
		width: 140rpx;
		height: 56rpx;
		border-radius: 0rpx 10rpx 0rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		line-height: 56rpx;
		text-align: center;
	}
	.listViewItem1a{
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
	}
	.listViewItem{
		margin-left: 24rpx;
		margin-top: 20rpx;
		padding-left: 20rpx;
		padding-bottom: 15rpx;
		width: 682rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.04);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.listView{
		padding-top: 10rpx;
		padding-bottom: 100rpx;
	}
	.tabsItemIcon{
		width: 20rpx;
		height: 10rpx;
	}
	.tabsItemText{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		color: #333333;
	}
	.tabsItem{
		width: 375rpx;
		height: 98rpx;
		background: #FFFFFF;
	}
	.tabs{
		width: 750rpx;
		height: 98rpx;
		background: #FFFFFF;
	}
page{
	background-color: #FAF7F8;
}
</style>
